package org.carry.god.framework.mp.config;

import com.baomidou.mybatisplus.autoconfigure.MybatisPlusAutoConfiguration;
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
import org.apache.ibatis.annotations.Mapper;
import org.carry.god.framework.mp.handler.BaseFieldHandler;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Bean;

/**
 * @author wanglei
 */
@AutoConfiguration(before = MybatisPlusAutoConfiguration.class)
@MapperScan(value = "${god.info.base-package}", annotationClass = Mapper.class)
public class MybatisAutoConfiguration {
    @Bean
    public MetaObjectHandler defaultMetaObjectHandler() {
        return new BaseFieldHandler();
    }
}
